"aspect-build/rules_swc"

module(
    name = "aspect_rules_swc",
    version = "2.4.2",
    compatibility_level = 1,
)

# Lower-bounds (minimum) versions for direct runtime dependencies
bazel_dep(name = "aspect_bazel_lib", version = "2.11.0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")  # Note: only used for provider symbols, we don't spawn nodejs actions
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.7")

swc = use_extension("@aspect_rules_swc//swc:extensions.bzl", "swc")
swc.toolchain(
    name = "swc",
    swc_version = "v1.7.40",
)
use_repo(swc, "swc_toolchains")

register_toolchains("@swc_toolchains//:all")

####### Dev dependencies ########

bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)
npm.npm_translate_lock(
    name = "npm",
    npmrc = "//:.npmrc",
    pnpm_lock = "//examples:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
